package com.woniu.pojo;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.Date;

/**
 * attendence
 * @author 
 */

public class Attendence implements Serializable {
    private Integer attendenceId;

    private Integer studentId;

    private Integer classId;

    private Date attendenceDate;

    private String attendenceResult;

    private String attendenceReason;

    private Integer courseId;

    private Integer empId;

    private static final long serialVersionUID = 1L;

    public Integer getAttendenceId() {
        return attendenceId;
    }

    public void setAttendenceId(Integer attendenceId) {
        this.attendenceId = attendenceId;
    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Date getAttendenceDate() {
        return attendenceDate;
    }

    public void setAttendenceDate(Date attendenceDate) {
        this.attendenceDate = attendenceDate;
    }

    public String getAttendenceResult() {
        return attendenceResult;
    }

    public void setAttendenceResult(String attendenceResult) {
        this.attendenceResult = attendenceResult;
    }

    public String getAttendenceReason() {
        return attendenceReason;
    }

    public void setAttendenceReason(String attendenceReason) {
        this.attendenceReason = attendenceReason;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Attendence other = (Attendence) that;
        return (this.getAttendenceId() == null ? other.getAttendenceId() == null : this.getAttendenceId().equals(other.getAttendenceId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getAttendenceDate() == null ? other.getAttendenceDate() == null : this.getAttendenceDate().equals(other.getAttendenceDate()))
            && (this.getAttendenceResult() == null ? other.getAttendenceResult() == null : this.getAttendenceResult().equals(other.getAttendenceResult()))
            && (this.getAttendenceReason() == null ? other.getAttendenceReason() == null : this.getAttendenceReason().equals(other.getAttendenceReason()))
            && (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId()))
            && (this.getEmpId() == null ? other.getEmpId() == null : this.getEmpId().equals(other.getEmpId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAttendenceId() == null) ? 0 : getAttendenceId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getAttendenceDate() == null) ? 0 : getAttendenceDate().hashCode());
        result = prime * result + ((getAttendenceResult() == null) ? 0 : getAttendenceResult().hashCode());
        result = prime * result + ((getAttendenceReason() == null) ? 0 : getAttendenceReason().hashCode());
        result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
        result = prime * result + ((getEmpId() == null) ? 0 : getEmpId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", attendenceId=").append(attendenceId);
        sb.append(", studentId=").append(studentId);
        sb.append(", classId=").append(classId);
        sb.append(", attendenceDate=").append(attendenceDate);
        sb.append(", attendenceResult=").append(attendenceResult);
        sb.append(", attendenceReason=").append(attendenceReason);
        sb.append(", courseId=").append(courseId);
        sb.append(", empId=").append(empId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}